SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- =============================================
-- Author:		Emanuel Santos
-- Create date: 21-01-2013
-- Description:	Adicionar evento
-- =============================================
CREATE PROCEDURE [ext].[sp_fe_addEvento] 
	-- Add the parameters for the stored procedure here
	@id_user uniqueidentifier, 
	@id_cat int,
	@data_i date,
	@data_f date,
	@titulo varchar(50),
	@descricao varchar(50),
	@preco money,
	@morada varchar(50),
	@codigo_postal varchar(9),
	@url varchar(50),
	@contato_telefonico varchar(50),
	@email varchar(50),
	@latitude varchar(20),
	@longitude varchar(20)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	INSERT INTO [ext].[evento] ([id_utilizador],[id_categoria],[data_inicio],[data_fim],[titulo],[descricao],[preco],[morada],[codigo_postal],[url],[contato_telefonico],[email],[latitude],[longitude])
	VALUES (@id_user,@id_cat,@data_i,@data_f,@titulo,@descricao,@preco,@morada,@codigo_postal,@url,@contato_telefonico,@email,@latitude,@longitude)
END
GO
